HotSwap

您所在的位置:网站首页 idea reload changed classes HotSwap

HotSwap

2024-07-09 19:10| 来源: 网络整理| 查看: 265

HotSwap

Sometimes, when you're making changes to your code, you want to immediately see how they will behave in a working application without shutting down the process. The HotSwap mechanism lets you reload classes changed during a debugging session without having to restart the entire application.

Reload changed classes

Suspend the program.

Press ⌘ ⇧ K and start typing Reload Changed Classes. Select the Reload Changed Classes action.

Searching for Reload Changed Classes action in the Goto popup]HotSwap limitations

Due to VM design, HotSwap has the following limitations:

it is only available if a method body is modified. Changing signatures is not supported.

adding and removing class members is not supported

if the modified method is already in the call stack, the changes will take effect only after the program exits the modified method. Until that moment, the method body remains unchanged, and the frame is marked as obsolete.

If you want to remove the limitations imposed by the standard VM, you can use the Dynamic Code Evolution VM with unlimited support for reloading classes at runtime.

Last modified: 11 February 2024WatchesAttach to process


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3